package com.doctcloud.hisinfo.histable.domain.comm;

import com.baomidou.mybatisplus.annotation.TableName;
import com.doctcloud.common.core.annotation.Excel;
import com.doctcloud.common.core.annotation.TableDesc;
import com.doctcloud.common.core.web.domain.BaseCharsetEntity;
import lombok.*;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

import static com.doctcloud.common.core.utils.StringUtils.trim;

@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(of = {"signClass"})
@ToString
@Data
//@TableName("drug_sign_class")
@TableDesc("药品标签分类字典")
//public class DrugSignClassDo extends BaseCharsetEntity {
public class DrugSignClassDo implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 药品标签分类
     */
    @Excel(name = "药品标签代码")
    @NotBlank(message = "药品标签代码不得为空")
    private String signClass;
    /**
     * 药品标签分类名称
     */
    @Excel(name = "药品标签名称")
    @NotBlank(message = "药品标签名称不得为空")
    private String signClassName;
    /**
     * 分类标签是否允许多选(0-多选 1-单选)
     */
    @Excel(name = "选择标记" , readConverterExp = "0=多选,1=单选")
    private Integer singleSel;

    /**
     * 标签使用颜色
     */

    private String signColor;
    @Data
    public class primaryKey {
        private String signClass;
        public primaryKey(String signClass) {
            this.signClass = signClass;
        }
    }
//    public String getSpecialClassName() {
//        return super.processGet(specialClassName);
//    }

//    public void setSpecialClassName(String specialClassName) {
//        this.specialClassName = super.processSet(specialClassName);
//    }

    public void setSignClass(String signClass) {
        this.signClass = trim(signClass);
    }

    public void setSignClassName(String signClassName) {
        this.signClassName = trim(signClassName);
    }
}
